package main

import (
	"fmt"
	"math"
	"sync"
)

type Point struct {
	X, Y float64
}

type Point2 struct {
	X, Y float64
}
type ColoredPoint struct {
	Point
	Point2
}

var cache = struct {
	sync.Mutex
	mapping map[string]string
}{
	mapping: make(map[string]string),
}

func main() {
	a := ColoredPoint{Point{1, 2}, Point2{3, 4}}
	fmt.Println(a.Point.Distance(a.Point))
}

func distance(p, q Point) float64 {
	return math.Hypot(p.X-q.X, p.Y-q.Y)
}

func (p Point) Distance(q Point) float64 {
	return math.Hypot(p.X-q.X, p.Y-q.Y)
}

func (p Point2) Distance(q Point2) float64 {
	return math.Hypot(p.X-q.X, p.Y-q.Y)
}
